<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport"
        content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <title>患者_患者病历信息</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/style.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui.2.0.css" />
    <link rel="stylesheet" type="text/css" href="../css/BasicPatientInformation.css" />
    <style>
        .aui-card-list {
            width: 96%;
            margin: 0.3rem auto;
            border-radius: 0.5rem;
            box-shadow: 0 0 8px rgba(0, 0, 0, .1)
        }

        .aui-card-list-footer {
            font-size: 0.6rem;
        }

        .aui-card-list-header {
            font-size: 0.7rem;
            font-weight: 700;
            color: #0064B0;
        }
    </style>
</head>

<body>
    <main id="app">
        <div class="aui-padded-5" id="tab1-con">
            <section class="aui-content">
                <div class="aui-card-list">
                    <div class="aui-card-list-header">
                        主诉：
                    </div>
                    <div class="aui-card-list-footer" id="meMrChiefComplaint">

                    </div>
                </div>
                <div class="aui-card-list">
                    <div class="aui-card-list-header">
                        现病史：
                    </div>
                    <div class="aui-card-list-footer" id="meMedicalHistory">

                    </div>
                </div>
                <div class="aui-card-list">
                    <div class="aui-card-list-header">
                        既往史：
                    </div>
                    <div class="aui-card-list-footer" id="mePastHistory">
                    </div>
                </div>
                <div class="aui-card-list">
                    <div class="aui-card-list-header">
                        体检：
                    </div>
                    <div class="aui-card-list-footer" id="mePhysicalCheck">
                    </div>
                </div>
                <div class="aui-card-list">
                    <div class="aui-card-list-header">
                        辅助检查：
                    </div>
                    <div class="aui-card-list-footer" id="meInspect">
                    </div>
                </div>
                <div class="aui-card-list">
                    <div class="aui-card-list-header">
                        诊断
                    </div>
                    <div class="aui-card-list-footer" id="meDiagnosis">
                    </div>
                </div>
                <div class="aui-card-list">
                    <div class="aui-card-list-header">
                        用药：
                    </div>
                    <div class="aui-card-list-footer" id="meMrMedication">
                    </div>
                </div>
            </section>
        </div>
    </main>
</body>
<script src="../script/api.js" charset="utf-8" type="text/javascript"></script>
<script src="../script/vue.js" charset="utf-8" type="text/javascript"></script>
<script src="../js/jquery.min.js" charset="utf-8" type="text/javascript"></script>
<script src="../js/ToConfigure.js" charset="utf-8" type="text/javascript"></script>
<script src="../script/aui-toast.js" charset="utf-8" type="text/javascript"></script>
<script src="../script/aui-dialog.js" charset="utf-8" type="text/javascript"></script>
<script src="../script/aui-tab.js" charset="utf-8" type="text/javascript"></script>
<script type="text/javascript">
    var vm = null;
    apiready = function () {
        //接收患者ID
        var F_ID = api.pageParam.F_ID;

        vm = new Vue({
            el: '#app',
            data: {
                F_ID: 0, //患者唯一标识
            },
            created() {
                //获取所属医院IP地址
                var Url_IP = ToConfigure_IP("Gorgeous");

                if (F_ID !== undefined && F_ID !== '') {
                    this.F_ID = F_ID;
                }

                //判断预约这ID不为空
                if (this.F_ID !== null && this.F_ID !== '' && this.F_ID !== undefined) {
                    //定义toast提示框
                    var toast = new auiToast();
                    var JsParms = new Object();
                    JsParms.meTrId = this.F_ID;
                    var jsonStr = JSON.stringify(JsParms);
                    $.ajax({
                        url: Url_IP + '/businessmanagement/homedicalorder/getHoMedicalRecord',
                        type: 'post',
                        async: false,
                        contentType: "application/json",
                        dataType: "json",
                        data: jsonStr,
                        success: function (result) {
                            /**
                             * 验证返回信息是否为空
                             */
                            if (result.success == true) {
                                /**
                                 *  循环object
                                 */
                                $.each(result.data.list, function (i, o) {
                                    /**
                                     *主诉
                                     */
                                    $("#meMrChiefComplaint").html(o.meMrChiefComplaint);
                                    /**
                                     *现病史
                                     */
                                    $("#meMedicalHistory").html(o.meMedicalHistory);
                                    /**
                                     *既往史
                                     */
                                    $("#mePastHistory").html(o.mePastHistory);
                                    /**
                                     *体检
                                     */
                                    $("#mePhysicalCheck").html(o.mePhysicalCheck);
                                    /**
                                     *辅助检查
                                     */
                                    $("#meInspect").html(o.meInspect);
                                     /**
                                     *诊断
                                     */
                                     $("#meDiagnosis").html(o.meDiagnosis);
                                    /**
                                     *用药
                                     */
                                    $("#meMrMedication").html(o.meMrMedication);
                                })
                            } else {
                                /**
                                 *  弹窗提示 暂无相关信息
                                 */
                                toast.fail({
                                    title: "加载失败",
                                    duration: 2000
                                });
                            }
                        },
                        error: function (result) {
                            /**
                             *  提示错误信息
                             */
                            toast.fail({
                                title: "加载失败",
                                duration: 2000
                            });
                        }
                    });
                }
            }
        });
    }
</script>

</html>